package com.qf.fmall2204.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean<TokenFilter> tokenFilterFilterRegistrationBean(TokenFilter tokenFilter){

        FilterRegistrationBean<TokenFilter> tokenFilterFilterRegistrationBean = new FilterRegistrationBean<>();

        tokenFilterFilterRegistrationBean.setFilter(tokenFilter);
        tokenFilterFilterRegistrationBean.setEnabled(false);

        return tokenFilterFilterRegistrationBean;

    }

}
